package io.renren.modules.jxgk.service.impl;

import io.renren.modules.jxgk.dao.CourseInfoDao;
import io.renren.modules.jxgk.entity.CourseInfoEntity;
import io.renren.modules.jxgk.entity.StudentInfoEntity;
import io.renren.modules.jxgk.service.CourseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class CourseInfoServiceImpl implements CourseInfoService{
    @Autowired
    CourseInfoDao courseInfoDao;
    public List<CourseInfoEntity> queryList(Map<String, Object> map){
        return courseInfoDao.queryList(map);
    }
    public int queryTotal(Map<String, Object> map){
        return  courseInfoDao.queryTotal(map);
    }
    public void deleteBatch(String[] termIds){
        courseInfoDao.deleteBatch(termIds);
    }
    public void save(CourseInfoEntity ste){
        courseInfoDao.save(ste);
    }
    public CourseInfoEntity queryObject(String index){
        return courseInfoDao.queryObject(index);
    }
    public void update(CourseInfoEntity ste){
        courseInfoDao.update(ste);
    }

    @Override
    public List<StudentInfoEntity> getCourseInfoList(String courseName) {
        HashMap map = new HashMap();

        map.put("courseName",courseName);
        return courseInfoDao.getCourseInfoList(map);
    }
}
